#pragma once

#include <AVUIExpression.h>

namespace AVUI {
class TemplateBindingExtension;

/// <summary>Describes a run-time instance of a <see cref="T:System.Windows.TemplateBindingExtension" />.</summary>
class TemplateBindingExpression : public Expression
{
public:
    DECLARE_ELEMENT(TemplateBindingExpression, Expression);

#pragma region Public Properties

    /// <summary>Gets the <see cref="T:System.Windows.TemplateBindingExtension" /> object of this expression instance.</summary>
    /// <returns />
    TemplateBindingExtension* get_TemplateBindingExtension() { return m_pTemplateBindingExtension; }

#pragma endregion Public Properties

#pragma region Internal Methods

    TemplateBindingExpression(TemplateBindingExtension* pTemplateBindingExtension) : m_pTemplateBindingExtension(pTemplateBindingExtension) { }
    TRefCountedPtr<Object> GetValue(DependencyObject* pDO, DependencyProperty* pDP)
    {
        return pDP->GetDefaultValue(pDO->get_Type());
    } 

#pragma endregion Internal Methods

private:

#pragma region Private Fields

    TRefCountedPtr<TemplateBindingExtension> m_pTemplateBindingExtension;

#pragma endregion Private Fields

};

}; // namespace AVUI

